enableCameraPositionClamping

abstract fun enableCameraPositionClamping(blocks: List<DesignBlock>, paddingLeft: Float = 0.0f, paddingTop: Float = 0.0f, paddingRight: Float = 0.0f, paddingBottom: Float = 0.0f, scaledPaddingLeft: Float = 0.0f, scaledPaddingTop: Float = 0.0f, scaledPaddingRight: Float = 0.0f, scaledPaddingBottom: Float = 0.0f)

Continually ensures the camera position to be within the width and height of the blocks axis-aligned bounding box. Without padding, this results in a tight clamp on the blocks. Disables any previously set camera position clamping in the scene and also takes priority over clamp camera commands.

Parameters

blocks

the blocks for which the camera position is adjusted to, usually, the scene or a page.

paddingLeft

optional padding in screen pixels to the left of the block.

paddingTop

optional padding in screen pixels to the top of the block.

paddingRight

optional padding in screen pixels to the right of the block.

paddingBottom

optional padding in screen pixels to the bottom of the block.

scaledPaddingLeft

optional padding in screen pixels to the left of the block that scales with the zoom level until five times the initial value.

scaledPaddingTop

optional padding in screen pixels to the top of the block that scales with the zoom level until five times the initial value.

scaledPaddingRight

optional padding in screen pixels to the right of the block that scales with the zoom level until five times the initial value.

scaledPaddingBottom

optional padding in screen pixels to the bottom of the block that scales with the zoom level until five times the initial value.